package com.woniu.car.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

@Data
public class ModifyGoodsParam {

    @ApiModelProperty(value = "商品ID",example = "1")
    @NotNull(message = "商品ID不能为空")
    @Min(value = 1, message = "商品ID有误")
    private String goodsId;


    /**
     * 商品分类id
     */
    @ApiModelProperty(value = "分类ID",example = "1")
    @NotNull(message = "分类ID不能为空")
    @Min(value = 1, message = "分类ID有误")
    private Integer categoryId;

    /**
     * 商品介绍
     */
    @ApiModelProperty(value = "商品介绍",required = true)
    @NotNull(message = "请填写商品介绍")
    private String description;

    /**
     * 商品基础价格
     */
    @ApiModelProperty(value = "商品价格",example = "0.00")
    @NotNull(message = "商品价格不能为空")
    @Min(value = 0, message = "价格设置有误")
    private Double goodsPrice;


    /**
     * 能否使用优惠券，0.不可以，1.可以
     */
    @ApiModelProperty(value = "优惠券限制,0.可用,1.不可用",example = "0")
    @NotNull(message = "优惠券限制不能为空,")
    @Min(value = 0)
    @Max(value= 1)
    private Integer isCoupon;

    @ApiModelProperty(value = "规格值id",example = "1")
    @NotNull(message = "规格值id能为空")
    @Min(value = 1, message = "规格值id有误")
    private Integer specValueId;


}
